﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace RoofusUIControls
{
    /// <summary>
    /// Interaction logic for SISettingsUI.xaml
    /// </summary>
    public partial class SISettingsUI : UserControl
    {
        RootfusCoreComponents.RootfusSurfaceItemWrapper _wrapper;
        public SISettingsUI(UIElement theSettings, RootfusCoreComponents.RootfusSurfaceItemWrapper wrapper)
        {
            _wrapper = wrapper;
            InitializeComponent();
            DockPanel.SetDock(theSettings, Dock.Bottom);
            dockPanel.Children.Add(theSettings);
        }

        private void Close_Click(object sender, RoutedEventArgs e)
        {
            Canvas holder = Parent as Canvas;
            holder.Children.Remove(this);
            _wrapper.ConfigDone();
        }
    }
}
